<template>
	<view class="microorganismReport">
		<!-- /////////////////////////微生物检测 - 水体总大肠菌群/////////////////////////-->
		<view v-if="all != null" class="boxWar borderB1">
			<view class="box">
				<view class="left">水体总大肠菌群</view>
				<view class="right">MPN/100mL</view>
			</view>
			<view class="tabWar">
				<view class="row tabTitle">
					<view class="item">采集时间</view>
					<view class="item">样品编号</view>
					<view class="item">监测结果</view>
				</view>
				<view class="row" v-for="(item, index) in all" :key="index">
					<view class="item">{{ item.cjTime }}</view>
					<view class="item">{{ item.ypbh }}</view>
					<view class="item blue">{{ item.projectData }}</view>
				</view>
			</view>
		</view>
		<!-- /////////////////////////微生物检测 - 耐热大肠菌群/////////////////////////-->
		<view v-if="heatproof != null" class="boxWar  borderB1">
			<view class="box">
				<view class="left">耐热大肠菌群</view>
				<view class="right">MPN/100mL</view>
			</view>
			<view class="tabWar">
				<view class="row tabTitle">
					<view class="item">采集时间</view>
					<view class="item">样品编号</view>
					<view class="item">监测结果</view>
				</view>
				<view class="row" v-for="(item, index) in heatproof" :key="index">
					<view class="item">{{ item.cjTime }}</view>
					<view class="item">{{ item.ypbh }}</view>
					<view class="item blue">{{ item.projectData }}</view>
				</view>
			</view>
		</view>
		<!-- /////////////////////////微生物检测 - 大肠埃希氏菌群/////////////////////////-->
		<view v-if="EscherichiaColiFlora != null" class="boxWar  borderB1">
			<view class="box">
				<view class="left">大肠埃希氏菌群</view>
				<view class="right">MPN/100mL</view>
			</view>
			<view class="tabWar">
				<view class="row tabTitle">
					<view class="item">采集时间</view>
					<view class="item">样品编号</view>
					<view class="item">监测结果</view>
				</view>
				<view class="row" v-for="(item, index) in EscherichiaColiFlora" :key="index">
					<view class="item">{{ item.cjTime }}</view>
					<view class="item">{{ item.ypbh }}</view>
					<view class="item blue">{{ item.projectData }}</view>
				</view>
			</view>
		</view>
		<!-- /////////////////////////微生物检测 - 菌落总数/////////////////////////-->
		<view v-if="allColi != null" class="boxWar  borderB1">
			<view class="box">
				<view class="left">菌落总数</view>
				<view class="right">CFU/100mL</view>
			</view>
			<view class="tabWar">
				<view class="row tabTitle">
					<view class="item">采集时间</view>
					<view class="item">样品编号</view>
					<view class="item">监测结果</view>
				</view>
				<view class="row" v-for="(item, index) in allColi" :key="index">
					<view class="item">{{ item.cjTime }}</view>
					<view class="item">{{ item.ypbh }}</view>
					<view class="item blue">{{ item.projectData }}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	name: 'microorganismReport',
	data() {
		return {
			ejectShow: false
		};
	},
	props: {
		ids: {
			type: [String, Number],
			default: 0
		},
		microorganismData: {
			type: [Object, Array],
			default: () => {
				return null;
			}
		}
	},
	computed: {
		all: function({ microorganismData }) {
			let value = null;
			if (microorganismData != null) {
				value = microorganismData.shuiti;
			}
			return value;
		},
		heatproof: function({ microorganismData }) {
			let value = null;
			if (microorganismData != null) {
				value = microorganismData.naire;
			}
			return value;
		},
		EscherichiaColiFlora: function({ microorganismData }) {
			let value = null;
			if (microorganismData != null) {
				value = microorganismData.aixi;
			}
			return value;
		},
		allColi: function({ microorganismData }) {
			let value = null;
			if (microorganismData != null) {
				value = microorganismData.junluo;
			}
			return value;
		}
	},

	methods: {},
	components: {}
};
</script>

<style lang="scss" scoped>
@import '@/common/css/asd.scss';
.microorganismReport {
	.boxWar {
		.box {
			min-height: 100rpx;
			line-height: 1;
			display: flex;
			align-items: center;
			justify-content: space-between;
			box-sizing: border-box;
			padding: 0 38rpx 0 90rpx;

			.left {
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: bold;
				color: #21b054;
				position: relative;
				&::after {
					content: '';
					position: absolute;
					width: 16rpx;
					height: 16rpx;
					left: -37rpx;
					top: 50%;
					transform: translateY(-50%);
					background-color: #21b054;
					border-radius: 50%;
				}
			}
			.right {
				font-size: 24rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #999999;
			}
		}
		.tabWar {
			@include ejectList(3);
		}
	}
}
</style>
